package tech.summerly.weather.data.remote

import android.support.annotation.IntRange
import com.google.gson.JsonObject
import kotlinx.coroutines.experimental.Deferred
import retrofit2.http.GET
import retrofit2.http.Query

/**
 * Created by summer on 18-3-11
 *
 * 高德地图 API
 */

interface AmapServiceApi {

    companion object {
        private const val KEY = "64bd9d6bc35bd2cf91a486f839e6f294"
    }

    @GET("geocode/regeo?key=$KEY&roadlevel=1&batch=false")
    fun region(@Query(value = "location") location: String,
               @Query(value = "radius") @IntRange(from = 0, to = 3000) radius: Int = 1000
    ): Deferred<JsonObject>

}